<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var num=prompt('请输入要打印的行数');
        var num2=prompt('请输入要打印的列数')
        var str='';
        for(var i=1;i<=num;i++){
            for(var j=1;j<=num2;j++){
                str=str+'*';
            }
            str=str+'\n';
        }
        alert(str);
    </script>
</head>
<body>
    
</body>
</html>